package com.xn.myyxcampus.utils;

import java.io.IOException;

import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;

public class JacksonUtils {
	private static ObjectMapper mapper = new ObjectMapper();
	public static<T> T jsonToBean(String jsonResult,Class<T> clz) throws JsonParseException, JsonMappingException, IOException {
		T t = mapper.readValue(jsonResult, clz);
		return t;
	}
}
